<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xmlns:rich="http://richfaces.org/rich">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value=" "></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:outputText value="#{produtoController.prepareView}" />
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <div style="width:100%;position:relative;">
                    <div style="width:300px;position: absolute; left:300px;" >
                        <div style="clear:both;">
                            <div style="float:left">
                                <h:graphicImage rendered="true" width="300px" height="400px" value="#{produtoController.selected.caminhoImagem}"/>
                            </div>

                        </div>
                        <div style="clear:both;">
                            <div  style="float:left">
                                <h:outputText value="#{produtoController.selected.descricao} " style="font-size: 18px;font-weight: bold; text-transform: lowercase"/>
                            </div>

                        </div>
                        <div style="clear:both;">
                            <div   style="float:left;">
                                <h:outputText value="#{bundle.ListProdutoTitle_colecao }" style="font-size: 10px;font-weight: bold; text-transform: uppercase; "/>
                                <h:outputText value=" " />
                                <h:outputText value="#{produtoController.selected.colecao.descricao.toString()}" style="font-size: 10px;font-weight: bold; text-transform: uppercase; "/>
                            </div>
                        </div>
                        <div style="clear:both;">
                            <div  style="float:left;text-align: right">
                                <h:outputText value="#{bundle.ListProdutoTitle_tamanho}:" style="font-size: 10px;font-weight: bold; text-transform: uppercase; "/>

                            </div>
                            <div  style="float:left;text-align: left">
                                <h:outputText value="#{produtoController.selected.tamanho.descricao}" style="font-size: 10px;font-weight: bold; text-transform: uppercase; "/>
                            </div>
                        </div>
                        <div style="clear:both;">
                            <div  style="float:right;text-align: left">
                                <h:outputText value="#{produtoController.selected.valorUnitario}" style="font-size: 20px; color: #990000" >
                                    <f:convertNumber pattern="R$####.00" />
                                </h:outputText>

                            </div>
                        </div>
                        <div style="clear:both; height: 50px">
                            <div style="float:left;text-align: left">
                                <a href="#" >
                                    <img src="/LaCruz_v2/faces/javax.faces.resource/img/facebook-icon.png" />
                                </a>
                                <a href="#">
                                    <img src="/LaCruz_v2/faces/javax.faces.resource/img/Twitter-icon.png" />
                                </a>
                            </div>
                            <div  style="float:right;text-align: left">
                                <a4j:commandLink rendered="#{userManager.authenticated}" execute="@form"   action="#{buyManager.AdicionarPedido(produtoController.selected)}"  render="carrinho messagePanel" >
                                    <h:graphicImage rendered="#{!userManager.admin}"  value="/LaCruz_v2/faces/javax.faces.resource/img/cart.png" />
                                    <f:ajax  event="click" execute="@this" immediate="true" render=":carrinho :messagePanel" />
                                </a4j:commandLink>
                            </div>
                        </div>
                        <div style="clear:both;" >
                            <div style="float:left;text-align: left">
                                <h:outputText value="#{bundle.CreateProdutoLabel_informacaoAdicional}" style="font-size: 18px;font-weight: bold; text-transform: lowercase"/>

                            </div>
                            <div  style="float:right;text-align: left;max-width: 300px; height: 50px;">
                                <h:outputText value="#{produtoController.selected.informacaoAdicional}" style="font-size: 10px; "/>
                            </div>

                        </div>
                    </div>

                </div>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
